package operation;

import book.Book;
import book.BookList;

public class BorrowOperation implements IOperation{
    @Override
    public void work(BookList bookList){
        System.out.println("借阅图书");

        int i = FindName.find(bookList);
        if (i == -1){
            System.out.println("查无此书");
            return;
        }
        Book book = bookList.getPos(i);
        book.setIsBorrowed(true);
        System.out.println("借阅成功");
    }
}
